home *** CD-ROM | disk | FTP | other *** search
/ NASA Climatology Interdisciplinary Data Collection / NASA Climatology Interdisciplinary Data Collection - Disc 4.iso / software / grads / lib / functions / gtim2dtg.gf < prev    next >
Text File  |  1994-02-16  |  379b  |  19 lines

  1. function gtim2dtg
  2. *
  3. *  convert current time to dtg character
  4. *
  5.   moname='JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC'
  6.   'q time'
  7.   t1=subwrd(result,3)
  8.   cyr=substr(t1,11,2)
  9.   nmo=substr(t1,6,3)
  10.   cda=substr(t1,4,2)
  11.   chr=substr(t1,1,2)
  12.   i=1
  13.   while (nmo!=subwrd(moname,i));i=i+1;endwhile
  14.   imo=i
  15.   cmo=substr(imo,1,2)
  16.   if(imo<10);cmo='0'imo;endif
  17.  
  18. return (cyr%cmo%cda%chr)
  19.